Field of the Invention
The present invention relates to a technique of improving focus detection accuracy in a focus detection apparatus.
Description of the Related Art
Conventionally, a phase difference detection method is generally known as an automatic focus detection method for a camera. According to the phase difference detection method, light beams from an object which have passed through different exit pupil areas of an imaging lens are formed into images on a pair of line sensors provided in an AF sensor. The relative positions of a pair of object images obtained by photoelectrical conversion using a pair of line sensors are computed to detect the defocus amount of the imaging lens (focus detection computation).
In such focus detection apparatuses, for the purpose of increasing the number of detection points of defocus amounts with respect to a plurality of objects and improving resolution, there is recently a tendency toward increasing the number of photoelectric conversion portions for acquiring focus detection images. On the other hand, an increase in the number of photoelectric conversion portions makes it very difficult to completely remove defects in the manufacture.
The following are known literatures concerning automatic focus detection techniques based on such a phase difference detection method. For example, Japanese Patent Laid-Open No. 2003-222786 discloses an AF sensor which performs gain control and accumulation time control based on the maximum value signals of line sensor signals and the difference signal between the maximum value signal and the minimum value signal. In addition, Japanese Patent Laid-Open No. 2001-177756 discloses a technique of obtaining a signal for focus detection by excluding a signal from a defective photoelectric conversion portion based on information concerning a defective pixel portion checked in advance in a manufacturing process or the like.
The technique disclosed in Japanese Patent Laid-Open No. 2003-222786 described above, however, has a problem that if there is a defect in a photoelectric conversion pixel portion of a line sensor, charge accumulation is finished before a sufficient object image signal is obtained.
The following is a detailed description of this problem. Assume that one of the images of an object formed on a pair of line sensors is represented by A image, and the other image is represented by B image. FIGS. 17A and 17B each show an example of a signal obtained from object images when there is no defective pixel portion. When an output signal reaches the maximum value determination voltage, an accumulation stop is determined, and the accumulation period is finished. In contrast, FIGS. 18A to 18C each show an example of a dark-time waveform when there is a defective pixel portion. A signal increase due to a dark current in the defective pixel portion is larger than that in a normal pixel portion. FIG. 19 shows how accumulation control is performed based on the maximum value signal for the same object as that in the case shown in FIGS. 17A and 17B when there is a defective pixel portion like that in the case shown in FIGS. 18A to 18C. Since an accumulation stop is determined when the defective pixel signal reaches the maximum value of the signal, the accumulation period is finished before signals are accumulated to an intended amount. As a result, the object signals in FIGS. 17A and 17B become those shown in FIGS. 20A and 20B. This makes it impossible to obtain a sufficient signal amount, leading to a decrease in the S/N ratio of a signal and a deterioration in focus detection computation accuracy.
In addition, as disclosed in Japanese Patent Laid-Open No. 2001-177756, it is possible to perform accumulation control upon excluding a signal from a defective photoelectric conversion portion based on information concerning a defective pixel portion checked in advance in a manufacturing process or the like. However, since focus detection computation is performed while a value is compensated from other pixel signals, it is not always possible to obtain a correct computation result.